import request from '@/utils/request'


//会员档案
//查询全部
export const listMember = (search) =>
    request({
        url: '/member/memberAll',
        method: 'get',
        params: {
            offset: search.offset,
            limit: search.limit,
            value: search.value,
        }
    })

//修改前查询
export const getMemberById = (id) =>
    request({
        url: '/member/memberKey/' + id,
        method: 'get'
    })

//添加
export const saveMember = (hMemberofthefile) =>
    request({
        url: '/member/addMember',
        method: 'post',
        data: hMemberofthefile
    })

//更新路由
export const updateMember = (hMemberofthefile) =>
    request({
        url: '/member/updateMember',
        method: 'put',
        data: hMemberofthefile
    })

//删除路由
export const removeMember = (id) =>
    request({
        url: '/member/removeMember/' + id,
        method: 'delete',
    })

export const login = (hMemberofthefile) =>
    request({
        url: '/member/login',
        method: 'post',
        data: hMemberofthefile
    })